package awt;

import java.awt.*;

/**
 * @description: 面板
 * @author: Tom
 * @create: 2019-07-22 17:22
 **/
public class PanelInFrame extends Frame {
    public PanelInFrame(String gc) {
        super(gc);
    }


    public static void main(String[] args) {
        PanelInFrame fr = new PanelInFrame("Frame with Pannel");
        Panel panel = new Panel();
        fr.setBackground(Color.white);
        fr.setSize(200, 200);
        fr.setLayout(null);
        panel.setSize(100, 100);
        panel.setBackground(Color.green);
        fr.add(panel);
        fr.setVisible(true);


    }
}
